package com.sdp.th.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;

import org.springframework.format.annotation.DateTimeFormat;

import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 离线设备信息
 * </p>
 *
 * @author zsp
 * @since 2025-05-08
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("th_eq_offline")
public class ThEqOffline extends Model<ThEqOffline> {

    private static final long serialVersionUID=1L;

    /**
     * 内码
     */
    @TableId("key_id")
    private String keyId;

    /**
     * 编码
     */
    @TableField("device_no")
    private String deviceNo;

    /**
     * 名称
     */
    @TableField("device_name")
    private String deviceName;

    /**
     * 设备类型
     */
    @TableField("device_type")
    private String deviceType;

    /**
     * 区域
     */
    @TableField("device_region")
    private String deviceRegion;

    /**
     * 房间
     */
    @TableField("device_room")
    private String deviceRoom;

    /**
     * 组织
     */
    @TableField("org_no")
    private String orgNo;

    /**
     * 记录生成时间
     */
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @TableField("create_time")
    private LocalDateTime createTime;


    @Override
    protected Serializable pkVal() {
        return this.keyId;
    }

}
